<template>
  <div>
    <h1>修改计算属性</h1>
    <input type="text" v-model.lazy="xing">
    <input type="text" v-model.lazy="ming">
    <input type="text" v-model.lazy="fullName">
  </div>
</template>

<script>
export default {
data() {
  return {
    xing: '鱼',
    ming: '卷'
  }
},
computed: {
  // 对象格式
  fullName: {
    get () {
      return this.xing + ' ' + this.ming
    },
    set (val) {
      // console.log(val)
      let arr = val.split(' ') 
      this.xing = arr[0]
      this.ming = arr[1]
    }
  }
}
}
</script>

<style>

</style>